package com.chinairi.mall.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.chinairi.mall.controller.viewobject.ReceiveAddressVO;
import com.chinairi.mall.model.GoodsShoppingCart;
import com.chinairi.mall.service.modelobject.GoodsShoppingCartMO;

import java.util.HashMap;
import java.util.List;

/**
 * <p>
 * 购物车表 服务类
 * </p>
 *
 * @author gsl
 * @since 2020-09-26
 */
public interface IGoodsShoppingCartService extends IService<GoodsShoppingCart> {

    /**
     * 加入商品到购物车
     *
     * @param goodsShoppingCartList
     */
    void addShoppingCart(List<GoodsShoppingCart> goodsShoppingCartList);

    /**
     * 查询用户购物车
     *
     * @return
     */
    HashMap<String, HashMap<String, List<GoodsShoppingCartMO>>>getCartGoods();

    /**
     * 修改购物车商品数量
     * @param goodsShoppingCart
     * @return
     */
    void updateGoodsNumber(GoodsShoppingCart goodsShoppingCart);

    /**
     * 获取购物车中的服务
     *
     * @return
     */
    HashMap<String, List<Object>> getCartService();

    /**
     * 获取首页展示的购物车商品数量
     * @return
     */
    Integer countGoodsNum();

    /**
     * 根据采购计划ID获取收货地址
     *
     * @param planPurchaseId
     * @return
     */
    ReceiveAddressVO getReceiveAddress(String planPurchaseId);
}
